package asapIs134CK.womi.client.event;


import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public class WomiEventDisplay extends Composite{
	private VerticalPanel panel;
	private Label date;
	private Label message;
	
	public WomiEventDisplay(WomiEvent event){
		panel = new VerticalPanel();
		panel.addStyleName("Event");
		DateTimeFormat formatter = DateTimeFormat.getShortDateTimeFormat();
		date = new Label(formatter.format(event.getDate()));
		date.addStyleName("Date");
		message = new Label(event.getMessage());
		panel.add(date);
		panel.add(message);
		initWidget(panel);
	}

}
